]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
messageTray: Use monitor geometry for dwelling
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 30 Aug 2012 16:14:24 +0000 (18:14 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Thu, 30 Aug 2012 16:52:17 +0000 (18:52 +0200)
In multi-monitor setups, the screen might extend below the edge of
the monitor that holds the tray. In that case the tray is currently
triggered from a secondary monitor, which is rather surprising;
change the check to use the correct monitor geometry instead.

https://bugzilla.gnome.org/show_bug.cgi?id=683044

js/ui/messageTray.js

index 52bb0e17653297f082ca0acb60f1c58b65b72210..2d7ef8ea2cad247477243c93d9090371b74fd8c2 100644 (file)
@@ -1497,7 +1497,10 @@ const MessageTray = new Lang.Class({
     },
 
     _checkTrayDwell: function(x, y) {
-        if (y == global.screen_height - 1) {
+        let monitor = Main.layoutManager.bottomMonitor;
+        let shouldDwell = (x >= monitor.x && x <= monitor.x + monitor.width &&
+                           y == monitor.y + monitor.height - 1);
+        if (shouldDwell) {
             // We only set up dwell timeout when the user is not hovering over the tray
             // (!this.actor.hover). This avoids bringing up the message tray after the
             // user clicks on a notification with the pointer on the bottom pixel